
	<div id="main" class="grid_17 alpha">
	
		<div class="post">
			<h1 id="lead"><?=$post_type_title?></h1>
			<?php if($this->session->flashdata('message')):?>
			<div class="message" id="message"><?=$this->session->flashdata('message');?></div>
			<?
				echo "<script>setTimeout(function (){document.getElementById('message').style.display = 'none';}, 2000)</script>";
			?>
			<?php endif;?>
			
			<?=validation_errors(); ?>
			<?=form_open('admin/post_type', array('id'=>'subForm')); ?>
			<?=form_hidden('id',$id)?>
			
			<p>
			<?php 
				echo form_label('分类名称','name', array('class'=>'label'));
				echo form_input('name', set_value('name', $name));
			?>
			</p>

			<p>
			<?php 
				echo form_label('分类排序','refer', array('class'=>'label'));
				
				$options = array();
				for ($i = 1; $i <= 50; $i++)
				{
					$options[$i] = $i;
					
				}
				
				echo form_dropdown('order', $options, set_value('order', $order == '' ? 10 : $order));
		
			?>
			</p>
			 
			<p>
				<?=form_submit('', '提交', 'id=subscribe');?>				
			</p>
			<?=form_close()?>
		</div>

		
    </div>
    
    <div id="sidebar" class="grid_7">
		<div class="widget">
				<h3>所有分类</h3>
					<ul class="list">
						<?php foreach($post_type as $type):?>
						<li><?=$type->name?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="<?=site_url('admin/post_type/' . $type->id)?>" style="text-decoration: underline;">编辑</a>&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="<?=site_url('admin/post_type_delete/' . $type->id)?>" style="text-decoration: underline;" onclick="return confirm('确定要删除吗？')">删除</a>
						</li>
						
						<?php endforeach;?>
					</ul>
		</div>
	</div>


	